package com.gitee.wsl.compose.chart.xy.bar.bullet.indicator

import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.unit.Dp
import com.gitee.wsl.common.ui.ext.shape.Shapes
import com.gitee.wsl.compose.chart.ExperimentalKoalaPlotApi
import com.gitee.wsl.common.ui.ext.shape.DiamondShape
import com.gitee.wsl.compose.ui.widget.Symbol

/**
 * A diamond-shaped indicator that may be used as a feature marker.
 * @param color The color for the marker
 * @param size The size for the marker in Dp
 */
@ExperimentalKoalaPlotApi
@Composable
fun DiamondIndicator(color: Color = MaterialTheme.colorScheme.primary, size: Dp) {
    Symbol(shape = Shapes.DiamondShape, size = size, fillBrush = SolidColor(color))
}

/**
 * A diamond-shaped indicator that may be used as a feature marker.
 * @param color The color for the marker
 * @param sizeFraction The size for the marker as a fraction of the bullet graph height.
 */
@ExperimentalKoalaPlotApi
@Composable
 fun DiamondIndicator(
    color: Color = MaterialTheme.colorScheme.primary,
    sizeFraction: Float = DefaultSizeFraction
) {
    Symbol(shape = Shapes.DiamondShape, sizeFraction = sizeFraction, fillBrush = SolidColor(color))
}